/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["lucid.apps.Terminal"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["lucid.apps.Terminal"] = true;
dojo.provide("lucid.apps.Terminal");

dojo.declare("lucid.apps.Terminal", lucid.apps._App, {
	init: function(args)
	{
		
		
		var app = dojo.i18n.getLocalization("lucid", "apps");
		this.win = new lucid.widget.Window({
			title: app["Terminal"],
			iconClass: this.iconClass,
			onClose: dojo.hitch(this, "kill")
		});
		this.term = new lucid.widget.Console({region: "center", path: (args.path || "/")})
		var killMyself = dojo.hitch(this, "kill");
		this.term.aliases.exit = function(params){
			killMyself();
		}
		this.win.addChild(this.term);
		this.win.show();
		this.win.startup();
	},
	
	kill: function(){
		if(!this.win.closed){ this.win.close(); }
	}
})

}


dojo.i18n._preloadLocalizations("lucid.apps.nls.Terminal", ["ROOT","en","en-gb","en-us","es","es-es","fr","fr-fr","xx"]);
